home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 5 / chrpro3.zip / MCONINPU.CMD < prev    next >
OS/2 REXX Batch file  |  1991-01-21  |  4KB  |  145 lines

  1. * Program MCONINPU - Monitors input of contributions
  2. Erase
  3. @ 2,20 say 'Contributions Entry Routine'
  4. ?
  5. Accept 'Enter number of week in month/quarter ' to WKNO
  6. Store T to continu
  7. Do while continu
  8.   Store val(wkno) to wknumb
  9.   Store (wknumb*8)+1 to FL
  10.   Store FL+9 to SS
  11.   Store 50-SS to SL
  12.   If wkno='1' .or. wkno='2' .or. wkno='3' .or. wkno='4' .or. wkno='5'
  13.     Store F to continu
  14.   else
  15.     If wknummax=15 .and. wknumb<15
  16.       Store F to continu
  17.       Store 122-SS to SL
  18.     else
  19.       Accept 'Invalid week number. Please re-enter [1-5, or 1-14] ' to wkno
  20.     endif
  21.   endif
  22. enddo
  23. Store $(curdateS,wknumb*6-5,5) to wkname
  24. Store chname+'  Contributions for '+wkname+' - -  '+curdate to HDR3A
  25. Select secondary
  26. Use CDIRFILE index CDIRFILE
  27. Select primary
  28. Store d+':CONTRIB' to MFILE
  29. Use &MFILE
  30. Release wkno,goodhdr,curdates,voteage,comments,lsep,msel,mfile,level1,validd1
  31. Release curdatex,curmonth,cmonthco,maxoffer,offnote,osel,nmonth,d,indate,chname
  32. Release offsform,offpledg,curdate,curyear
  33. Set intensity off
  34. Store T to continu
  35. Store '0' to N
  36. Do while N<>OT
  37.   Store str(val(N)+1,1) to N
  38.   Store 00.00 to OCATPT&N
  39.   Store 00.00 to OCATGT&N
  40. enddo
  41. STORE 00.00 TO TOTALGT
  42. Store 1 to curptc
  43. ?
  44. Accept 'Starting at first page? ' to RESP
  45. If !(resp) = 'N'
  46.   Store 'N' to resp
  47.   Do while !(resp)<>'Y'
  48.    Erase
  49.    @ 12,10 say 'Enter starting page number                     ' GET CURPTC
  50.    @ 14,10 say 'Enter previous partial grand total for '+OCATNAM1 get OCATGT1
  51.    If OT<>'2'
  52.     @ 16,10 say 'Enter previous partial grand total for '+OCATNAM2 get OCATGT2
  53.     IF OT<>'3'
  54.      @ 18,10 say 'Enter previous partial grand total for '+OCATNAM3 get OCATGT3
  55.      If OT<>'4'
  56.      @ 20,10 say 'Enter previous partial grand total for '+OCATNAM4 get OCATGT4
  57.      endif
  58.     endif
  59.    endif
  60.    READ
  61.    Store str(curptc,3,0) to ptcs
  62.    Store OCATGT1 TO OCATGT5
  63.    IF OT<>'2'
  64.     STORE OCATGT2+OCATGT5 TO OCATGT5
  65.     IF OT<>'3'
  66.      STORE OCATGT3+OCATGT5 TO OCATGT5
  67.      IF OT<>'4'
  68.       STORE OCATGT4+OCATGT5 TO OCATGT5
  69.      ENDIF
  70.     ENDIF
  71.    ENDIF
  72.    STORE str(OCATGT5,9,2) to enblank
  73.    Store OCATGT5 to OCATGT&OT
  74.    ? 'Page'+PTCS+' starting GRAND TOTAL =   $'+ENBLANK
  75.    Accept 'Ok? ' to resp
  76.   enddo
  77. endif
  78. Store '                                         ' to enblank
  79. Store '0' to envno
  80. Do while continu
  81.   Store 0 to EC
  82.   Store enblank+enblank+enblank+enblank+enblank+enblank to envnbrs
  83.   Store str(curptc,3,0) to ptcs
  84.   Store T to samepage
  85.   Do while samepage
  86.     Erase
  87.     Store envno to penvno
  88.     @ 2,1 say 'CONTRIBUTIONS REPORTING  - -  WEEK OF '+;
  89. WKNAME+'     Previous Envl No: '+PENVNO
  90.     @ 3,61 say 'Page:'+PTCS
  91.     If EC<60
  92.       ?
  93.       Accept ' Enter envelope number ' to envno
  94.     else
  95.       ?
  96. ? 'Record count for this page total has reached 60.  Page totaling is forced.'
  97.       Accept 'Press <retn> to continue ' to XX
  98.       Store 'P' to envno
  99.     endif
  100.     Store F to valid1
  101.     Do while .not. valid1
  102.     Do CASE
  103.       CASE !(envno)='Q'
  104.         Store F to continu
  105.         Store T to valid1
  106.         Store T to samepage
  107.       CASE !(envno)='P'
  108.         Store F to samepage
  109.         Store T to valid1
  110.         Store EC to ECMAX
  111.       otherwise
  112.         Store val(envno) to envnumb
  113.         If envnumb>offermax .or. envnumb<1
  114.           ?
  115.           Accept 'ENVELOPE NUMBER NOT VALID.  PLEASE ENTER ANOTHER ' to envno
  116.         ELSE
  117.           Store '0' to ENVNUMBX
  118.           GOTO envnumb
  119.           DO MCINSCRN.CMD
  120.           STORE T TO VALID1
  121.        ENDIF
  122.      ENDCASE
  123.      enddo (VALID1)
  124.   enddo (samepage)
  125.   If continu
  126.     Do MCPGTOTL.CMD
  127.     Accept 'Last page of contributions? ' to resp
  128.     Store T to continu
  129.     If !(resp)='Y' .or. !(resp)='Q'
  130.       Store F to continu
  131.       ? "Write down the above figures as tie-out figures for the week."
  132.       Accept 'Then press <retn> to exit  ' to resp
  133.     endif
  134.     Store curptc+1 to curptc
  135.   endif
  136. enddo
  137. USE
  138. RETURN
  139.  
  140.  
  141.   If wknummax=15 .and. wknumb<15
  142.       Store F to continu
  143.       Store 122-SS to SL
  144.     else
  145.       Accept